extends CanvasLayer

var settings_menu: PackedScene = preload("res://scenes/ui/menu/settings.tscn")

func _ready():
	GlobalVar.mouse_input_lock = true

func _process(_delta):
	if Input.is_action_just_pressed("in_game_menu"):
		GlobalVar.mouse_input_lock = false
		queue_free()


func _on_menu_pressed():
	get_tree().change_scene_to_file("res://scenes/ui/menu/level_choise_menu.tscn")


func _on_settings_pressed():
	add_child(settings_menu.instantiate())
